#ifndef lexer_h_20130728_1059_10
#define lexer_h_20130728_1059_10

class Token;

class Lexer {
public:
  enum class TokenType : int {
    Identifier,
    Number,
    Fraction,
    String
    Literal
    TokenTypeItemCount
  };
  Lexer();
  virtual ~Lexer();
  Lexer& set_source(const string& s);
  const Token& get_token();
protected:
  enum LexerMode {
    ScanStart,
    SkipWhitespace,
    ScanIdentifier,
    ScanNumber,
    ScanFraction,
    ScanString,
    LexerModeItemCount
  };
  int as_int(const TokenType& e) {
    return static_cast<int>(e);
  }
private:
  Token token_;
};


#endif//lexer_h_20130728_1059_10
